clear all

use "C:\RCFS Data\table 4 data.dta"

gen absEss=abs(esss)
gen absE1s=abs(es1s)
gen absEsm=abs(essm)
gen absE1m=abs(es1m)

summ absEss if depvar=="Profitability" & finonly~=1 & (type=="C" | type=="DC" | index==3573), detail /* 3573 has a continuous and dummy measure */
summ absEss if depvar=="Firm Value" & finonly~=1 & (type=="C" | type=="DC" | index==3573), detail
summ absEss if depvar=="Leverage" & finonly~=1 & (type=="C" | type=="DC"), detail
summ absEss if depvar=="Investment" & finonly~=1 & (type=="C" | type=="DC" | type=="CC"), detail
summ absEss if depvar=="Dividends" & finonly~=1 & (type=="C" | type=="DC"), detail
summ absEss if depvar=="Cash holdings" & finonly~=1 & (type=="C" | type=="DC"), detail
summ absEss if finonly~=1 & (type=="C" | type=="DC" | index==3573 | type=="CC"), detail

summ absE1s if depvar=="Profitability" & finonly~=1 & (type=="D" | type=="DD" | type=="DDD"), detail 
summ absE1s if depvar=="Firm Value" & finonly~=1 & (type=="D" | type=="DD" | type=="DDD"), detail
summ absE1s if depvar=="Leverage" & finonly~=1 & (type=="D" | type=="DD" | type=="DDD"), detail
summ absE1s if depvar=="Investment" & finonly~=1 & (type=="D" | type=="DD" | type=="DDD"), detail
summ absE1s if depvar=="Dividends" & finonly~=1 & (type=="D" | type=="DD" | type=="DDD"), detail
summ absE1s if depvar=="Cash holdings" & finonly~=1 & (type=="D" | type=="DD" | type=="DDD"), detail
summ absE1s if finonly~=1 & (type=="D" | type=="DD" | type=="DDD"), detail

summ absEsm if depvar=="Profitability" & finonly~=1 & (type=="C" | type=="DC" | index==3573), detail /* 3573 has a continuous and dummy measure */
summ absEsm if depvar=="Firm Value" & finonly~=1 & (type=="C" | type=="DC" | index==3573), detail
summ absEsm if depvar=="Leverage" & finonly~=1 & (type=="C" | type=="DC"), detail
summ absEsm if depvar=="Investment" & finonly~=1 & (type=="C" | type=="DC" | type=="CC"), detail
summ absEsm if depvar=="Dividends" & finonly~=1 & (type=="C" | type=="DC"), detail
summ absEsm if depvar=="Cash holdings" & finonly~=1 & (type=="C" | type=="DC"), detail
summ absEsm if finonly~=1 & (type=="C" | type=="DC" | index==3573 | type=="CC"), detail

summ absE1m if depvar=="Profitability" & finonly~=1 & (type=="D" | type=="DD" | type=="DDD"), detail 
summ absE1m if depvar=="Firm Value" & finonly~=1 & (type=="D" | type=="DD" | type=="DDD"), detail
summ absE1m if depvar=="Leverage" & finonly~=1 & (type=="D" | type=="DD" | type=="DDD"), detail
summ absE1m if depvar=="Investment" & finonly~=1 & (type=="D" | type=="DD" | type=="DDD"), detail
summ absE1m if depvar=="Dividends" & finonly~=1 & (type=="D" | type=="DD" | type=="DDD"), detail
summ absE1m if depvar=="Cash holdings" & finonly~=1 & (type=="D" | type=="DD" | type=="DDD"), detail
summ absE1m if finonly~=1 & (type=="D" | type=="DD" | type=="DDD"), detail
